;小写转大写
assume cs:code,ds:data
data segment
    str db 'ABCabc','$'
    buf db ' ',0AH,'$'
data ends
code segment
start:
    mov ax,data
    mov ds,ax
    mov dx,offset str
    mov bx,offset str
    mov cx,6
s:  
    mov al,[bx]
    and al,1011111B
    ;与运算，能把小写的ASCII字母转成大写的
    ;and al,0100000B,或运算，大写转小写
    mov [bx],al
    add bx,1
    loop s
    mov ah,9
    int 21H
    mov ah,4CH
    int 21H
code ends
end start
end


